<div class="pull-left tableTools-container">
    <div class="dt-buttons btn-overlap btn-group">
        <button class="btn btn-primary" onclick="formEdit()">发起代扣</button>
    </div>
</div>
<div class="row">
    <div class="col-xs-12">
        <table id="table" class="table table-striped table-bordered table-hover" width="100%">
            <thead>
                <tr>
                    <th class="center">ID</th>
                    <th class="center">扣款人</th>
                    <th class="center">身份证号</th>
                    <th class="center">银行卡号</th>
                    <th class="center">金额（元）</th>
                    <th class="center">状态</th>
                    <th class="center">操作时间</th>
                </tr>
            </thead>

            <tbody>

            </tbody>
        </table>
    </div><!-- /.span -->
</div><!-- /.row -->

<!-- page specific plugin scripts -->
<script>
    $(document).ready(function() {
        $('#table').DataTable( {
            "processing": true,
            "lengthChange": false,
            "filter": false,
            //开启服务器模式
            serverSide: true,
            //数据来源（包括处理分页，排序，过滤） ，即url，action，接口，等等
            ajax: '/tools/deduct/list_data',
            columns: [
                { data: 'id', className: 'center' },
                { data: 'name', className: 'center' },
                { data: 'idCardNo', className: 'center' },
                { data: 'bankCardNo', className: 'center' },
                { data: 'amount', className: 'center' },
                { data: 'status', className: 'center' },
                { data: 'createTimeStr', className: 'center' }
            ]
        } );
    } );

    function formEdit(){
        $(location).attr('href', '/tools/deduct/form?menuId=<%=menuId%>');
    }


</script>